/**
 * 
 */
package Square;

import java.awt.Color;

import javax.swing.JPanel;

import Monopol.MonopolExceptions.InsufficientFunds;
import Monopol.AssetGroups.AssetGroup;
import Player.Player;


/**
 * @author Avia Tam
 * @author Assaf Miron
 *
 */
public interface Negotiable {
	
	/**
	 * Check if the Asset can be Bought or not
	 * @return True if the Asset can be bought, False otherwise
	 */
	public boolean isBuyable();
	
	/**
	 * Check if the Asset can be Sold or not
	 * @return True if the Asset can be sold, False otherwise
	 */
	public boolean isSellable();
	
	/**
	 * Buy the Asset if it is possible
	 * @param Player The Player that wants to buy this Asset
	 * @throws InsufficientFunds 
	 */
	public void buy(Player player) throws InsufficientFunds;
	
	/**
	 * Sell the Asset if it is possible
	 * @param Player The Player that wants to Sell This Asset
	 */
	public void sell(Player player);
	
	/**
	 * Distinguish regular Square from asset Square
	 * @return True if this is an asset
	 */
	public boolean isAsset();
	
	/**
	 * @return The Name of The Asset
	 */
	public String getName();
	
	/**
	 * @return The Asset Group of this Asset
	 */
	public AssetGroup getGroup();
	
	/**
	 * sets the owner
	 */
	public void setOwner(Player player);
	
	/**
	 * @return The Cost of the Negotiable Asset
	 */
	public Double getCost();
	

	/**
	 * @return The Owner Color of this Negotiable Asset
	 */
	public Color getColor();
	
	/**
	 * @return The Swing Representation of the Negotiable Asset
	 */
	public JPanel draw();

	/**
	 * @return
	 */
	public Object getDetails();
}
